package com.example.apione.model;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.apione.dao.ApiAccesslogDao;
import com.example.apione.entity.ApiAccesslog;
import com.example.apione.utils.ResponseResult;

import java.util.List;

/**
 * @author 尘落
 * @date 2023/2/25
 */
public class LogModel {
    public static ResponseResult<List<ApiAccesslog>> getlog(ApiAccesslogDao apiAccesslogDao){
        QueryWrapper<ApiAccesslog> queryWrapper =new QueryWrapper<>();
        queryWrapper.orderByDesc("create_time");
        List<ApiAccesslog> apiAccesslog =apiAccesslogDao.selectList(queryWrapper);
        return ResponseResult.ok(apiAccesslog);
    }
}
